package cn.xxliang.platapp.controller;

import cn.xxliang.platapp.pojo.dto.OrderInfoDto;
import cn.xxliang.platapp.pojo.query.OrderInfoQuery;
import cn.xxliang.platapp.common.BaseRespWithData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;

@Validated
@RestController
@RequestMapping("/orderInfo")
@Api(tags = "订购信息管理")
public class OrderInfoController {

    @PostMapping("/save")
    @ApiOperation("保存订购信息")
    public BaseRespWithData saveOrderInfo(@RequestBody @Valid OrderInfoDto dto) {
        return new BaseRespWithData().code(200).msg("操作成功");
    }

    @GetMapping("/get")
    @ApiOperation("查询订购信息")
    public BaseRespWithData getOrderInfo(@RequestParam @NotNull(message = "手机号不能为空") String msisdn) {
        return new BaseRespWithData().code(200).msg("查询成功");
    }

    @PostMapping("/list")
    @ApiOperation("查询所有订购信息列表")
    public BaseRespWithData getOrderInfoList(@RequestBody @Valid OrderInfoQuery query) {
        return new BaseRespWithData().code(200).msg("查询成功");
    }

    
}